//
//  ViewController.m
//  2.18homework(afternoon)
//
//  Created by student on 16/2/18.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.image = [[UIImageView alloc]initWithFrame:CGRectMake(40, 40, 300, 150)];
    UIImage *img1 = [UIImage imageNamed:@"apress_logo"];
    
    self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 250, 10, 20)];
    [self.view addSubview:self.image];
    self.nameLabel=[[UILabel alloc]initWithFrame:CGRectMake(10, 250, 50, 20)];
    self.nameLabel.text=@"账号";
    [self.view addSubview:self.nameLabel];
    
    self.numberLabel=[[UILabel alloc]initWithFrame:CGRectMake(10, 300, 50, 20)];
    self.numberLabel.text=@"密码";
    [self.view addSubview:self.numberLabel];
    
    self.nameTextField=[[UITextField alloc]initWithFrame:CGRectMake(80, 250, 300, 20)];
    self.nameTextField.placeholder=@"请输入用户名";
    [self.view addSubview:self.nameTextField];
    
    self.numberTextField=[[UITextField alloc]initWithFrame:CGRectMake(80, 300, 300, 20)];
    self.numberTextField.placeholder=@"请输入密码";
    [self.view addSubview:self.numberTextField];
    
    self.sliderValueLable=[[UILabel alloc]initWithFrame:CGRectMake(30, 350, 20, 20)];
    self.sliderValueLable.text=@"0";
    [self.view addSubview:self.sliderValueLable];
    
    self.slider=[[UISlider alloc]initWithFrame:CGRectMake(70, 350, 300, 20)];
    self.slider.maximumValue=0;
    self.slider.maximumValue=100;
    [self.view addSubview:self.slider];
    
    self.s=[[UISegmentedControl alloc]initWithFrame:CGRectMake(30, 400, 350, 40)];
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
